//
//  TimeUtils.swift
//  SmartCheckIn
//
//  Created by Cidy Chou on 2017/9/4.
//  Copyright © 2017年 CidyChou. All rights reserved.
//

import Foundation

class TimeUtils {

    
    
    
    static func stringToTimeStamp(stringTime:String)->String {
        
        let dfmatter = DateFormatter()
        dfmatter.dateFormat="yyyyMMdd"
        let date = dfmatter.date(from: stringTime)
        
        let dateStamp:TimeInterval = date!.timeIntervalSince1970
        
        let dateSt:Int = Int(dateStamp)
        print(dateSt)
        return String(dateSt)
        
    }
    
    
}
